package com.tencreat.service.mall;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tencreat.common.core.HttpResult;
import com.tencreat.common.core.domain.model.LoginUser;
import com.tencreat.common.core.domain.model.ReqIdParam;
import com.tencreat.common.core.domain.model.ReqIdsParam;
import com.tencreat.domain.mall.MallGoodsCollage;
import com.tencreat.domain.mall.MallGoodsKill;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tencreat.domain.mall.dto.MallGoodsCollageDTO;
import com.tencreat.domain.mall.dto.MallGoodsRecordDTO;
import com.tencreat.domain.mall.vo.*;
import com.tencreat.domain.mall.dto.GoodsKillListAppDTO;

/**
 * 商品秒杀Service接口
 *
 * @author tencreat
 * @date 2021-09-08
 */
public interface IMallGoodsKillService extends IService<MallGoodsKill> {
    /**
     * 查询商品秒杀
     *
     * @param id         商品秒杀ID
     * @param loginCheck
     * @return 商品秒杀
     */
    HttpResult<ResGoodsKillDetailVO> selectMallGoodsKillById(ReqIdParam id, LoginUser loginCheck);

    /**
     * 查询商品秒杀列表
     *
     * @param mallGoodsKill 商品秒杀
     * @return 商品秒杀集合
     */
    public List<MallGoodsKill> selectMallGoodsKillList(MallGoodsKill mallGoodsKill);

    /**
     * 新增商品秒杀
     *
     * @param mallGoodsKill 商品秒杀
     * @return 结果
     */
    public int insertMallGoodsKill(MallGoodsKill mallGoodsKill);

    /**
     * 修改商品秒杀
     *
     * @param mallGoodsKill 商品秒杀
     * @return 结果
     */
    public int updateMallGoodsKill(MallGoodsKill mallGoodsKill);

    /**
     * 批量删除商品秒杀
     *
     * @param ids 需要删除的商品秒杀ID
     * @return 结果
     */
    public int deleteMallGoodsKillByIds(ReqIdsParam ids);

    /**
     * 删除商品秒杀信息
     *
     * @param id 商品秒杀ID
     * @return 结果
     */
    public int deleteMallGoodsKillById(ReqIdParam id);

    Page<ResGoodsKillListAppVO> page(IPage<ResGoodsKillListAppVO> page, GoodsKillListAppDTO vo);

    IPage<MallGoodsKillVO> getPCList(IPage<?> page, MallGoodsCollageDTO dto) ;

    HttpResult<Map<String, Object>> getPCDetails(Long id);

    /**
     * 秒杀管理金额统计
     * @return
     */
    MallGoodsKillStatisticsVO killStatistics();

    /**
     *秒杀记录/积分记录
     * @param iPage
     * @param dto
     * @return
     */
    IPage<MallGoodsKIllRecordVo> killRecord(IPage<?> iPage, MallGoodsRecordDTO dto);

    boolean reSortOrderReduce(MallGoodsKill reqIdParam);

    boolean reSortOrderPlus(MallGoodsKill reqIdParam);
}
